import request from '@/utils/request'

// 查询项目流水列表
export function listXmls(query) {
  return request({
    url: '/fztz/xmls/list',
    method: 'get',
    params: query
  })
}

// 查询项目流水详细
export function getXmls(xmlsId) {
  return request({
    url: '/fztz/xmls/' + xmlsId,
    method: 'get'
  })
}

// 新增项目流水
export function addXmls(data) {
  return request({
    url: '/fztz/xmls',
    method: 'post',
    data: data
  })
}

// 修改项目流水
export function updateXmls(data) {
  return request({
    url: '/fztz/xmls',
    method: 'put',
    data: data
  })
}

// 删除项目流水
export function delXmls(xmlsId) {
  return request({
    url: '/fztz/xmls/' + xmlsId,
    method: 'delete'
  })
}

// 获取项目流水主键ID
export function getXmLsId() {
  return request({
    url: '/fztz/xmls/getXmLsId',
    method: 'get'
  })
}

// 新增附件
export function insertXmlsFjByXmlsId(data) {
  return request({
    url: '/fztz/xmls/add/File/By/subId',
    method: 'post',
    data: data
  })
}

// 根据主表ID查询附件列表
export function selectXmlsFjList(xmlsId) {
  return request({
    url: '/fztz/xmls/get/FileList/By/subId?sId=' + xmlsId,
    method: 'get'
  })
}

// 删除项目流水附件
export function deleteLstbXmlsFjByFjIds(fjId) {
  return request({
    url: '/fztz/xmls/fj/' + fjId,
    method: 'delete'
  })
}

// 获取费用月报
export function selectYbFyList(xmsbId, nd, sdZt) {
  return request({
    url: '/fztz/xmls/selectYbFy/?xmsbId=' + xmsbId + '&nd=' + nd + '&sdZt=' + sdZt,
    method: 'get',
  })
}
